var read = require('./read');
var write = require('./write');
var async = require('async');
var url='http://www.sanwen.net/';
//文章采集
async.waterfall([
    function(cb){
        read.article(url,function(err,data){
            cb(err,data);
        });
    },
    function(data,cb){
        //写入数据库
        write.article(data,function(){
            cb();
        })
    }
],function(){
    console.log('文章数据采集完成！');
});
